<?php
namespace app\api\controller;

use think\Request;
use app\common\model\ProductCat as ProductCatModel;

class Api{

    public function cat(Request $request){
        $pid = $request->param('pid',0,'intval');

        $productCats = ProductCatModel::all(['pid'=>$pid]);
        $productCats = collection($productCats)->toArray();

        return json($productCats);
    }

    public function shop(){

    }


}